package com.gao.baseboot.singletondiprototype.mi;

import com.gao.baseboot.prototype.PrototypeBean;
import org.springframework.beans.factory.annotation.Lookup;
import org.springframework.stereotype.Component;

/**
 * 方法注入
 *
 * @author GaoXi
 * @date 2022/2/21 19:55
 */
@Component
public abstract class ProtoTypeBeanManager {

    public PrototypeBean getPrototypeBean() {
        PrototypeBean prototypeBean = createPrototypeBean();
        return prototypeBean;
    }

    @Lookup
    protected abstract PrototypeBean createPrototypeBean();


}
